﻿@model HopNguyenModel.TypeSupport
@{
    ViewBag.Title = "Sửa: " + Model.Name;
    Layout = "~/Views/Shared/_BackendLayout.cshtml";
}

<div class="page-header position-relative">
    <h1>Sửa: @Model.Name
    </h1>
</div>
<!--/.page-header-->
<div class="row-fluid">
    <div class="tabbable">
        <ul class="nav nav-tabs" id="myTab">
            <li class="active">
                <a data-toggle="tab" href="#tab1">
                    <i class="green icon-home bigger-110"></i>
                    Thông tin chung
                </a>
            </li>
        </ul>

        <form id="validate" action="/cpanel/edittypesupport" method="POST">
            @if (ViewBag.msg == "success")
            {
                <div class="alert alert-success">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>Thành công!</strong> Cập nhật thành công.
                </div>
            }
            @if (ViewBag.Error != null)
            {
                <div class="alert alert-error">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>Lỗi!</strong> @ViewBag.Error
                </div>
            }
            <input type="hidden" name="Id" value="@Model.Id"/>
            <div class="tab-content">
                <div class="tab-pane active" id="tab1">
                    <div class="formField">
                        <div class="row-fluid">
                            <div class="span2">
                                <span class="fLabel">Tên loại</span>
                            </div>
                            <div class="span9">
                                <input type="text" name="name" value="@Model.Name">
                            </div>
                        </div>
                    </div>
                    <div class="formField">
                        <div class="row-fluid">
                            <div class="span2">
                                <span class="fLabel">Tham số</span>
                            </div>
                            <div class="span9">
                                <input type="text" name="Parameter" value="@Model.Parameter">
                            </div>
                        </div>
                    </div>
                    <div class="formField">
                        <div class="row-fluid">
                            <div class="span12">
                                <strong>Mẫu hỗ trợ</strong>
                                <textarea name="Pattern" class="ckeditor">@Model.Pattern</textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="formButtons">
                    <div class="row-fluid">
                        <div class="span2"></div>
                        <div class="span9">
                            <button class="btn btn-info" type="submit">
                                <i class="icon-ok bigger-110"></i>
                                Cập nhật
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

